package cn.tedu.qxhouserent.passport.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
@Accessors(chain = true)
public class RoleUpdateInfoParam implements Serializable {
    @NotEmpty(message = "修改角色失败,必须提交角色名称")
    @ApiModelProperty(value = "角色名称", required = true,example = "可可的角色")
    private String name;

    @NotEmpty(message = "修改角色失败,必须提交角色简介")
    @ApiModelProperty(value = "角色简介", required = true,example = "可可的角色简介")
    private String description;

    @NotNull(message = "修改角色失败,必须提交排序序号")
    @Range(max = 99, message = "排序序号值必须0~99之间")
    @ApiModelProperty(value = "排序序号,必须是1-255之间的数字",required = true,example = "87")
    private Integer sort;

    @NotNull(message = "修改角色失败,必须为角色指定管理员")
    @ApiModelProperty(value = "为该角色指定管理员，允许为空",required = false,dataType = "Long")
    private Long[] adminIds;

    @NotNull(message = "修改角色失败,必须为角色指定权限")
    @ApiModelProperty(value = "为该角色指定权限，允许为空",required = false,dataType = "Long")
    private Long[] permissionIds;
}
